fix: correctly cache mesh collision objects - #49
Closed
LoayAhmed304 wants to merge 8 commits into
Closed
Conversation
…nfiguration and collision layers
…proved readability
LoayAhmed304
force-pushed
the
fix/models-caching
branch
from
April 22, 2026 18:14
926e427 to
837e020
Compare
AhmedSobhy01
force-pushed
the
feat/shooting
branch
from
April 22, 2026 22:43
ce15a81 to
1e52104
Compare
Collaborator
|
Cherry-picked the two commits to #47, closing this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This prevents the current game crashing on reusing collision shapes for enemies
shapeCacheIdfor colliders to store the cache id for the model/mesh when loaded. This isn't deserialized, but instead is set by the enemy spawned when creating an enemy.meshDataCachefor the collision system to store meshes collision objects.Future work
btBvhTriangleMeshShapefor dynamic objects (enemies), it's optimized for static environments. Instead, we should usebtGImpactMeshShape.